<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<link rel="stylesheet" type="text/css"
	href='resources/CSS/<spring:message code="page.css"/>' />
<link rel="stylesheet" href='resources/CSS/<spring:message code="page.css.uniform"/>'
	type="text/css" media="screen"/>
<link rel="stylesheet" type="text/css"
	href="resources/CSS/base/jquery.ui.all.css" />
<link rel="stylesheet" type="text/css"
	href="resources/CSS/base/jquery.ui.selectmenu.css" />
<!-- link rel="stylesheet" type="text/css"
	href="resources/CSS/validation/jquery.validity.css" /-->
<link rel="stylesheet" type="text/css" href='resources/CSS/<spring:message code="page.css.alert"/>' />
<link rel="stylesheet" type="text/css" href="resources/CSS/datePicker.css" />
<link rel="stylesheet" type="text/css" href="resources/CSS/jsDatePick_ltr.css" />



<script language="Javascript" src="resources/Js/jquery-1.6.2.js"></script>
<!-- script src="resources/Js/ui/<spring:message code="page.js"/>" type="text/javascript" charset="utf-8"></script-->

<script language="Javascript" src="resources/Js/ui/jquery.ui.core.js"></script>

<script language="Javascript" src="resources/Js/ui/jquery.ui.widget.js"></script>

<script language="Javascript" src="resources/Js/ui/jquery.tools.min.js"></script>

<script language="Javascript"
	src="resources/Js/scriptbreaker-multiple-accordion-1.js"></script>

<script language="Javascript"
	src="resources/Js/ui/jquery.ui.selectmenu.js"></script>

<!-- script language="Javascript" src="resources/Js/jquery.pngFix.js"></script-->

<script language="Javascript" src="resources/Js/common.js"></script>

<script language="Javascript" src="resources/Js/ofcrequest.js"></script>

<script language="Javascript" src="resources/Js/multifile.js"></script>

<script language="Javascript" charset="utf-8" src='resources/Js/<spring:message code="page.js.alert"/>' /></script>

<!-- script language="Javascript" charset="utf-8"
	src="resources/Js/validation/jquery.validate.min.js" /></script-->
	
<!-- script language="Javascript"
	src='resources/Js/validation/localization/<spring:message code="page.js.validation"/>'></script-->

<script type="text/javascript" src="resources/Js/ui/jsDatePick.full.1.3.js"></script>

<!--[if lt IE 7]>
			<script type="text/javascript" src="resources/Js/unitpngfix.js"></script>
<![endif]-->
<script>
	window.onload = function(){
		new JsDatePick({
			useMode:2,
			target:"inputField1",
			dateFormat:"%d %M %Y"
			/*selectedDate:{				This is an example of what the full configuration offers.
				day:5,						For full documentation about these settings please see the full version of the code.
				month:9,
				year:2006
			},
			yearsRange:[1978,2020],
			limitToToday:false,
			cellColorScheme:"beige",
			dateFormat:"%m-%d-%Y",
			imgPath:"img/",
			weekStartDay:1*/
		});
				new JsDatePick({
			useMode:2,
			target:"inputField2",
			dateFormat:"%d %M %Y"
			/*selectedDate:{				This is an example of what the full configuration offers.
				day:5,						For full documentation about these settings please see the full version of the code.
				month:9,
				year:2006
			},
			yearsRange:[1978,2020],
			limitToToday:false,
			cellColorScheme:"beige",
			dateFormat:"%m-%d-%Y",
			imgPath:"img/",
			weekStartDay:1*/
		});
			//PNG fix ?!
        if ($().pngFix) {
            $(document).pngFix();
        }

        $("select#requestStatus").change(function () {
            var selected_value = $("select#requestStatus option:selected").attr("title");
            if(selected_value != 0){
            	$('select#requestStatus').attr('title', selected_value);
            }
    		
         }).change();
	};
	//Clear Date
	$('img.clear_recieved_date').live('click', function(){
		$('input#inputField2').val("");
	});
	
	$('img.clear_submission_date').live('click', function(){
		$('input#inputField1').val("");
	});

	function prepareJAlertButtons(){
		$.alerts.okButton='<spring:message code="label.document.delete.confirm.yes"/>';
		$.alerts.cancelButton='<spring:message code="label.document.delete.confirm.no"/>';
	}
	function showCancelCloseConfirmation(url, isCancelled){
		prepareJAlertButtons();
		var confirmMessage = "";
		if(isCancelled){
			confirmMessage = '<spring:message code="label.request.cancel.confirm.message"/>';
		}else{
			confirmMessage = '<spring:message code="label.request.close.confirm.message"/>';
		}
		jConfirm(confirmMessage,'', function(r){
			if(r){
				var anchor = document.createElement("a");

				if('Microsoft Internet Explorer'== navigator.appName){
					anchor.setAttribute("href", url);
					anchor.style.display = "none";
					document.getElementsByTagName("body")[0].appendChild(anchor);
					anchor.click();
					return true;
				}else{
					window.location = url; 
					return true;					
				}
			}else {
				return false;
			}
		});
	}
</script>
